package com.lenovo.leos.filebrowser.engine.util;

import java.io.Serializable;

import android.os.Parcel;
import android.os.Parcelable;

public class HistoryItem extends Object implements Serializable {
	private static final String TAG = "HistoryItem";
	
	public static final int HI_TYPE_ROOT = 0;
	public static final int HI_TYPE_FOLDER = 1;	
	public static final int HI_TYPE_SEARCH = 2;	
	
	private static final long serialVersionUID = 1L;
	
	private int type;
	private String data;
	private String extra;
	
	public HistoryItem(int t, String d, String e) {
		type = t;
		data = d;
		extra = e;
	}
	
	public HistoryItem(int type) {
		this(type, null, null);
	}
	
	public HistoryItem(int type, String data) {
		this(type, data, null);
	}
	
	public HistoryItem clone() {
		return new HistoryItem(type, data, extra);
	}
	
	public void setType(int t){
		type = t;
	}
	
	public int getType() {
		return type;
	}
	
	public void setData(String d) {
		data = d;
	}
	 
	public String getData() {
		return data;
	}
	
	public void setExtra(String e) {
		extra = e;
	}
	
	public String getExtra() {
		return extra;
	}
	
	// for test
	public void dump() {
		Log.i(TAG, "\ntype is " + String.valueOf(type));
		Log.i(TAG, "data is " + data);
		Log.i(TAG, "data is " + data);
	}
}